package com.ap.core.validation.rules;


/**
 * User: Ranjit.Singh
 * @param <V>
 *            info object type to be validated
 */
public interface ValidationRule<V> {

    /**
     * validates the Info Object
     *
     * @param infoObject
     *            <V> info object type to be validated
     * @return true/false on the basis of the condition check
     */
    boolean validate(V infoObject);
    
    void onFailureAction(V infoObject);

    String getErrorCode();

}
